#ifndef ___FILE_H___
#define	___FILE_H___

#ifdef __cplusplus
extern "C" {
#endif

#ifdef PC_DEBUG
	#define FILE_NAME	"/home/share/work/test-verification/nk980iot/read-primitive-measurement/primitive.txt"
#else
	#define FILE_NAME	"/mnt/mtdblock2/primitive.txt"
	//#define FILE_NAME	"/mnt/mmcblk0p1/primitive.txt"
#endif


struct primitive_meas
{
	int pm;				/* out file */
	int file_size;		/* file size */
	int data_size;		/* buffer size */
};

extern struct primitive_meas primitive_measurement;


int init_pm();
int write_file(int fd, char * buf, size_t count);
void close_file(int fd);


#ifdef __cplusplus
}
#endif

#endif /* ___FILE_H___ */
